﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Shared/OneColumn.Master" AutoEventWireup="true" CodeBehind="Security.aspx.cs" Inherits="SharingCenter.Web.User.CurrentProfile.Security" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitlePlaceHolder" runat="server">
账户安全
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .changepw{margin:auto; width:400px;}
    </style>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContentPlaceHolder" runat="server">
<myuc:GenericTabs ID="GenericTabs1" runat="server" Section="Settings" SelectedItem="security" />
<h2 class="bb"><div>
<myuc:IconSet ID="IconSet1" runat="server" CssClass="nss ns-key" Text="账户安全" /></div></h2>
    <myuc:MessageBox runat="server" Text="为确保账户安全，您应当定期更换密码。" />
    
    <div class="ctn2">
            <div>
            <h3 class="w5">更换密码</h3>
           <div class="formtable changepw">
               <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                <ContentTemplate>
                
               <asp:ChangePassword ID="ChangePassword1" runat="server" 
                   ChangePasswordFailureText="当前密码或新密码有误，请重试。" >
                   <ChangePasswordTemplate>
                       <table border="0" cellpadding="1" cellspacing="0" 
                           style="border-collapse:collapse;">
                           <tr>
                               <td>
                                   <table border="0" cellpadding="0">
                                       <tr>
                                           <td align="right">
                                               <asp:Label ID="CurrentPasswordLabel" runat="server" 
                                                   AssociatedControlID="CurrentPassword">当前密码:</asp:Label>
                                           </td>
                                           <td>
                                               <asp:TextBox ID="CurrentPassword" runat="server" TextMode="Password"></asp:TextBox>
                                               <asp:RequiredFieldValidator ID="CurrentPasswordRequired" runat="server" 
                                                   ControlToValidate="CurrentPassword" ErrorMessage="必须输入密码" ToolTip="必须输入密码" 
                                                   ValidationGroup="ChangePassword1" Display="None"></asp:RequiredFieldValidator>
                                               <cc:CustomValidatorCallOut ID="CustomValidatorCallOut1" runat="server" TargetControlID="CurrentPasswordRequired">
                                               </cc:CustomValidatorCallOut>
                                           </td>
                                       </tr>
                                       <tr>
                                           <td align="right">
                                               <asp:Label ID="NewPasswordLabel" runat="server" 
                                                   AssociatedControlID="NewPassword">新密码:</asp:Label>
                                           </td>
                                           <td>
                                               <asp:TextBox ID="NewPassword" runat="server" TextMode="Password"></asp:TextBox>
                                               <asp:RequiredFieldValidator ID="NewPasswordRequired" runat="server" 
                                                   ControlToValidate="NewPassword" ErrorMessage="必须输入密码。" ToolTip="必须输入密码。" 
                                                   ValidationGroup="ChangePassword1" Display="None"></asp:RequiredFieldValidator>
                                                   <cc:CustomValidatorCallOut ID="CustomValidatorCallOut2" runat="server" TargetControlID="NewPasswordRequired">
                                               </cc:CustomValidatorCallOut>
                                               <asp:RegularExpressionValidator ID="PasswordLengthValidator" runat="server" ControlToValidate="NewPassword" ValidationExpression="^.{6,}$"
                                                Display="None" ErrorMessage="密码长度必须不小于6位。"></asp:RegularExpressionValidator>
                                                <cc:CustomValidatorCallOut ID="CustomValidatorCallOut5" runat="server" TargetControlID="PasswordLengthValidator">
                                               </cc:CustomValidatorCallOut>
                                           </td>
                                       </tr>
                                       <tr>
                                           <td align="right">
                                               <asp:Label ID="ConfirmNewPasswordLabel" runat="server" 
                                                   AssociatedControlID="ConfirmNewPassword">确认新密码:</asp:Label>
                                           </td>
                                           <td>
                                               <asp:TextBox ID="ConfirmNewPassword" runat="server" TextMode="Password"></asp:TextBox>
                                               <asp:RequiredFieldValidator ID="ConfirmNewPasswordRequired" runat="server" 
                                                   ControlToValidate="ConfirmNewPassword" ErrorMessage="必须确认新密码。" 
                                                   ToolTip="必须确认新密码。" ValidationGroup="ChangePassword1" Display="None"></asp:RequiredFieldValidator>
                                                   <cc:CustomValidatorCallOut ID="CustomValidatorCallOut3" runat="server" TargetControlID="ConfirmNewPasswordRequired">
                                               </cc:CustomValidatorCallOut>
                                           </td>
                                       </tr>
                                       <tr>
                                           <td align="center" colspan="2">
                                               <asp:CompareValidator ID="NewPasswordCompare" runat="server" 
                                                   ControlToCompare="NewPassword" ControlToValidate="ConfirmNewPassword" 
                                                    ErrorMessage="新密码必须一致。" ValidationGroup="ChangePassword1" Display="None"></asp:CompareValidator>
                                                   <cc:CustomValidatorCallOut ID="CustomValidatorCallOut4" runat="server" TargetControlID="NewPasswordCompare">
                                               </cc:CustomValidatorCallOut>
                                           </td>
                                       </tr>
                                       <tr>
                                           <td align="center" colspan="2" style="color:Red;">
                                               <asp:Literal ID="FailureText" runat="server" EnableViewState="False"></asp:Literal>
                                           </td>
                                       </tr>
                                       <tr>
                                           <td align="right" colspan="2">
                                               <asp:LinkButton ID="ChangePasswordLinkButton" runat="server" 
                                                   CommandName="ChangePassword" CssClass="submitbutton" 
                                                   ValidationGroup="ChangePassword1">更换密码</asp:LinkButton>
                                           </td>
                                       </tr>
                                   </table>
                               </td>
                           </tr>
                       </table>
                   </ChangePasswordTemplate>
                   <SuccessTemplate>
                       <table border="0" cellpadding="1" cellspacing="0" 
                           style="border-collapse:collapse;">
                           <tr>
                               <td>
                                   <table border="0" cellpadding="0">
                                       <tr>
                                           <td align="center" colspan="2">
                                               
                                               <div class="hltext">密码已经成功更新。</div>
                                               </td>
                                       </tr>
                                       <tr>
                                           <td>
                                               </td>
                                       </tr>
                                       <tr>
                                           <td align="right" colspan="2">
                                               <asp:HyperLink ID="ContinuePushButton" runat="server" CausesValidation="False" 
                                                   NavigateUrl="Default.aspx" CssClass="submitbutton" Text="确定" />
                                           </td>
                                       </tr>
                                   </table>
                               </td>
                           </tr>
                       </table>
                   </SuccessTemplate>
               </asp:ChangePassword>
               </ContentTemplate>
               </asp:UpdatePanel>
           </div>
        </div>
</div>
</asp:Content>
